﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Gl_mes.DAL.MesDB
{
    [Serializable]
    [Table("prod_lend_repay")]
    public class ProdLendRepay
    {
        /// <summary>
        /// ID，主键，自增长
        /// </summary>
        [Key]
        [Column("id")]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int ID { get; set; }


        /// <summary>
        /// 生产线ID
        /// </summary>
        [Column("line_id")]
        public int LineID { get; set; }

        /// <summary>
        /// 生产线代号
        /// </summary>
        [Column("line_code")]
        [MaxLength(20)]
        public string LineCode { get; set; }

        /// <summary>
        /// 生产线名称
        /// </summary>
        [Column("line_name")]
        [MaxLength(20)]
        public string LineName { get; set; }

        /// <summary>
        /// 生产线别名
        /// </summary>
        [Column("cal_group_name")]
        [MaxLength(20)]
        public string CalGroupName { get; set; }

        /// <summary>
        /// 日期
        /// </summary>
        [Column("fill_date")]
        public DateTime FillDate { get; set; }


        /// <summary>
        /// 工单ID
        /// </summary>
        [Column("prod_id")]
        public int ProdID { get; set; }

        /// <summary>
        /// 工单号
        /// </summary>
        [Column("prod_number")]
        [MaxLength(20)]
        public string ProdNumber { get; set; }

        /// <summary>
        /// 借贷标志，0是借出，1是还贷
        /// </summary>
        [Column("flag")]
        public int Flag { get; set; }

        /// <summary>
        /// 是否失效，1代表失效，其他值代表生效
        /// </summary>
        [Column("is_del")]
        public int IsDel { get; set; }

        /// <summary>
        /// 借贷数量
        /// </summary>
        [Column("lr_qty")]
        public decimal LendRepayQty { get; set; }

        /// <summary>
        /// 建档人
        /// </summary>
        [Column("create_user")]
        [MaxLength(20)]
        public string CreateUser { get; set; }

        /// <summary>
        /// 建档日期
        /// </summary>
        [Column("create_date")]
        public DateTime CreateDate { get; set; }
    }
}
